package com.glsc.ngateway.platform.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xuchang
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SystemFlowStatisticsVo {

    private MonthBarFlowTypeData monthBarFlowTypeData;
    private MonthBarSystemTypeData monthBarSystemTypeData;
    private List<Pie> flowTypePieData;
    private List<SystemTypePie> systemTypePieData;

    private List<Timeline> timelineData;
    private List<TimelineMultiple> timelineMultipleData;
    private List<Pie> testSystemModifyFlowPieData;
    private List<Pie> systemModifyAuditFlowPieData;
    private List<String> currentSystemNameList;

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class MonthBarFlowTypeData{
        @JsonProperty("xData")
        private List<String> xData;
        private List<Series> seriesData;
    }
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class MonthBarSystemTypeData{
        @JsonProperty("xData")
        private List<String> xData;
        private List<Series> seriesData;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Series{
        private String name;
        private String id;
        private String type;
        private Integer[] data;
    }
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Pie{
        private String name;
        private Integer value;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SystemTypePie{
        private String name;
        private String systemClassNo;
        private Integer value;
    }
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Timeline{
        private String label;
        private List<TimelineChild> children;
    }
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TimelineMultiple{
        private String label;
        private List<TimelineMutipleChild> children;
        @Builder.Default
        private List dataSource = new ArrayList();
    }
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TimelineChild{
        private Integer level;
        private String processDefineKeyName;
        private String processTitle;
        private String flowCreateOperatorName;
        private String processCreateTime;
        private String processId;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TimelineMutipleChild{
        private Integer level;
        private Integer count;
    }
}
